#include "include/setting.h"


// 全局变量
MysqlUser* mysql;

// 数据库初始化
void InitMysql() {
	mysql = new MysqlUser("127.0.0.1", "root", "OuZhenXian3762", "c_plane_system", 3306,NULL,0);
    if (mysql->connect()) {
        // 成功连接
        std::cout << "MySQL connection successful!" << std::endl;
    }
    else {
        // 连接失败
        exit(-1);
    }

    if (mysql->setCharSet("utf8mb4")) {
        std::cout << "MySQL character set successful!" << std::endl;
    }
    else {
        // 连接失败
        exit(-1);
    }

}

